import{a as _}from"./chunks/chunk.6GTBLXMB.js";import{a as f}from"./chunks/chunk.X3O7GISG.js";import{a as n,c as a,f as d}from"./chunks/chunk.E2S4XPE2.js";import{g as m}from"./chunks/chunk.4GMQEBIT.js";n();a();d();var p=m(f()),w=m(_());n();a();d();var y=m(f()),l=class extends y.Sentry.Transports.FetchTransport{sendEvent(o){return super.sendEvent(o)}};window.Sentry=p.Sentry;var s=(0,w.default)(window),P=/\/(\d+\.\d+\.\d+)\/?$/;function B(e){let o=e.match(P);return o?o[1]:void 0}var D=(e,o,t,c)=>({numberOfPages:e.siteHeader?.pagesCount,revision:e.siteHeader?.revision,geo:e.geo,editorVersion:o,metaSiteId:e.metaSiteId,isDesktopEditor:!0,isMobileEditor:!1,esi:e.editorSessionId,editorLoaded:!1,isPreview:!1,isAppStudio:c!==void 0,ds:t.origin,isNewBundle:!!t.isNewBundle}),M=e=>({runningExperiments:e.runningExperiments,isPublished:e.siteHeader?.published}),v=e=>(e.exception?.values?.[0]?.stacktrace?.frames??[]).filter(t=>t&&typeof t.filename=="string").some(t=>t.filename.includes("wixCode")||t.filename.includes("wix-code")),O=(e="")=>e.includes("play() failed because the user didn't interact with the document first")||e.includes("The play() request was interrupted by a call to pause()"),k=()=>{let{editorModel:e,loggerModel:o,appStudioModel:t,serviceTopology:c}=window,S=e.editorBase??(c.scriptsLocationMap["santa-editor"]||""),x=B(S),E=s.isParameterTrue("force-enable-sentry")||!s.isParameterTrue("suppressbi")&&!s.isParameterTrue("isqa")&&!s.getParameterByName("EditorSource")&&!s.getParameterByName("santa-editor-override"),g="2afef17995757cf9f239fef51a0392095f1cd563caa284f6104821f0",b=g?`santa-editor@${g}`:void 0,T="https://f432f47cfde34ebc9d320d006a71c57e@sentry-next.wixpress.com/7163";p.Sentry.init({dsn:T,environment:"production",release:b,transport:l,autoSessionTracking:!0,enabled:E,ignoreErrors:["ResizeObserver loop limit exceeded"]}),p.Sentry.configureScope(i=>{i.setTags(D(e,x,o,t)),i.setExtras(M(e)),i.setUser({id:e.permissionsInfo?.loggedInUserId,roles:e.permissionsInfo?.loggedInUserRoles}),i.addEventProcessor((r,u)=>O(typeof u?.originalException=="string"?u.originalException:u?.originalException?.message)?null:(r.extra={...r.extra,biHistoryUrl:`https://bo.wix.com/bi-ux/#/history?timezone=0&fields=date_created,src,evid,evid_desc,error_type,error_info,tags,extra,error_context,origin,uuid,msid,esi,dm_version,os_name,browser_family,browser_name,app_name,country_code&uuid=${e.permissionsInfo.ownerId}&start=${String(Date.now()-4*6e4)}&stop=${String(Date.now()+4*6e4)}&wql=msid%3D%22${e.metaSiteId}%22&order=asc&levels=1,2,3,4`},r.tags=r.tags||{},v(r)&&(r.tags={...r.tags,"wix-code-error":!0},r.fingerprint=(r.fingerprint||[]).concat(["wix-code-error"])),r.tags.hasOwnProperty("whiteScreenOfDeath")&&(r.fingerprint=["{{ default }}","whiteScreenOfDeath"]),r))})};k(); //# sourceMappingURL=__error-reporter-init__.TTS47NHZ.js.map